<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../inc/commonJs.html">
<script type="text/javascript" charset="utf-8" src="${request.contextPath}/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="${request.contextPath}/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="${request.contextPath}/ueditor/ueditor.parse.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="${request.contextPath}/ueditor/lang/zh-cn/zh-cn.js"></script>
<title>Insert title here</title>
</head>

<body>
<div class="easyui-panel" data-options="fit:true,border:false">
	<div  id="meetingWindow">
		<form id="meetingForm" method="post">
			 <table class="table-edit" width="100%" align="center" border="1" cellspacing="0" cellpadding="0" style=" margin-top:10px; border-collapse: collapse; border:#ccc 1px solid;">
			 	<tr >
	    			<td height="35" width="20%" align="right"><font color='red'>*</font><span class="smallFont" >会议名称:</span></td>
	    			<td align="left">
	    				<input type="hidden" id="meetingid" name="meetingid" />
	    				<input class="easyui-validatebox" type="text" id="title" name="title" data-options="required:true" style="width:400px;height: 10px" />
	    			</td>
    			</tr>
			 	<tr >
	    			<td height="35" align="right"><font color='red'>*</font><span class="smallFont">会议室:</span></td>
	    			<td align="left">
	    				<input id="roomid" name="roomid" style="width:400px;" />   
	    			</td>
    			</tr>
			 	<tr >
	    			<td height="35" align="right"><font color='red'>*</font><span class="smallFont">时间:</span></td>
	    			<td align="left">
	    				<input class="easyui-datetimebox" type="text" id="dt" name="dt" data-options="required:true,showSeconds:false" style="width:400px;" />
	    			</td>
    			</tr>
			 	<tr >
	    			<td height="35" align="right"><font color='red'>*</font><span class="smallFont">参会人员:</span></td>
	    			<td align="left">
	    				<input class="easyui-validatebox" type="text" id="users" name="users" data-options="required:true" style="width:400px;height: 10px" />
	    			</td>
    			</tr>
			 	<tr >
	    			<td height="100" align="right"><span class="smallFont">会议内容:</span></td>
	    			<td align="left">
	    				<script id="editor" name="content" type="text/plain" style="height:300px;width:800px"></script>
	    			</td>
    			</tr>
    			<tr>
	    			<td height="35" align="right"><span class="smallFont">状态:</span></td>
	    			<td align="left">
	    				<select id="zt" class="easyui-combobox" name="zt" style="width:400px;">   
						    <option value="1">未开始</option>   
						    <option value="0">已结束</option>   
						</select> 
	    			</td>
	    		</tr>
    			<tr>
	    			<td colspan="2" height="35" align="center">
	    			<div style="text-align:center;padding:5px">
				    	<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="savemeeting()">保存</a>
				    	<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="formReset()">重置</a>
			    	</div>
	    			</td>
	    		</tr>
			 </table>
		</form>
	</div>
</div>
</body>
<script type="text/javascript">
	var ue = UE.getEditor('editor');
$(function(){
	$('#roomid').combobox({  
		    url:'selectUsedMeetingRoom.do',
		    valueField:'roomid',    
		    textField:'name' 
		});
	<#if meetingid??>
	$('#meetingForm').form('load','selectOneMeeting.do?meetingid='+${meetingid!"0"},function(data){
		alert(data);
	});
	</#if>
})

function savemeeting(){
	$('#meetingForm').form('submit', {  
	    url:'saveMeeting.do',
	    onSubmit: function(param){
	    	var isValid = $(this).form('validate');
			return isValid;
	    },
	    success:function(data){
	    	formReset();
	    	$.messager.show({
				title:'信息提示',
				msg:data
			});
	    }    
	}); 
}

function formReset(){
	ue.execCommand('cleardoc');
	$('#meetingForm').form('reset');
}
</script>
</html>